//
//  BottomBar.h
//  CarTown
//
//  Created by xionghao on 15/8/26.
//  Copyright (c) 2015年 熊浩. All rights reserved.
//

#import <UIKit/UIKit.h>
@class BottomBar;
@protocol BottomBarBtnClickDelegate <NSObject>
@optional
-(void)BottomBar:(BottomBar *)bottombar otherbtnClick:(NSInteger)index;
-(void)BottomBarAllclick:(BottomBar *)bottombar;
-(void)BottomBarPostClick:(BottomBar *)bottombar;

@end

@protocol BottombarDataSource <NSObject>

-(NSInteger)numberofBottobarcount:(BottomBar *)bottombar;

@end


@interface BottomBar : UIView
-(instancetype)initWithBtnTitleArray:(NSArray *)titles WithDelegate:(id<BottomBarBtnClickDelegate>) delegate :(BOOL)isshowall;
@property (nonatomic,weak) id<BottomBarBtnClickDelegate> delegate;
@property (nonatomic,weak) id<BottombarDataSource> datasource;
@property (nonatomic,assign) NSTimeInterval anmi;
@property (nonatomic,assign) BOOL btnenable;
@property (nonatomic,assign) BOOL allselected;
@property (nonatomic,assign) BOOL isAllselected;
@property (nonatomic,assign) BOOL ishide;

@property (nonatomic,copy) NSString *posttile;
-(void)switchView;
-(void)showInView:(UIView *)view;
-(void)addInView:(UIView *)view;
-(void)show;
-(void)hide;
@property (nonatomic,strong) NSArray *titlearray;
@property (nonatomic,assign) BOOL ishwopost;
-(void)reloadbtn;
@end
